﻿using Autofac;
using EventHandlerDemo.Domain.Bases.UOW;

namespace EventHandlerDemo.Application
{
    public class DomainModule : Module
    {
        protected override void Load(ContainerBuilder builder)
        {
            builder.RegisterType<AsyncLocalCurrentUnitOfWorkProvider>().As<ICurrentUnitOfWorkProvider>().InstancePerLifetimeScope();
            builder.RegisterType<UnitOfWorkManager>().As<IUnitOfWorkManager>().InstancePerLifetimeScope();
        }
    }
}
